<?php
include_once('filtro_cabecera.php');
include_once('menu_administracion.php');
include_once "../funciones/funciones_php.php";
?>
<html>
<head>
<title>Editar Orden de Flete</title>

<script src="../funciones/funciones_js.js"></script>
<script src="../funciones/jquery-1.5.2.js"></script>

<script language="javascript">
$(document).ready(function() {
    $().ajaxStart(function() {

        $('#loading').show();
        $('#result').hide();
    }).ajaxStop(function() {
        $('#loading').hide();
        $('#result').fadeIn('slow');
    });
    $('#form, #fat, #formulario').submit(function() {
        $.ajax({
            type: 'POST',
            url: $(this).attr('action'),
            data: $(this).serialize(),
            success: function(data) {
                $('#result').html(data);

            }
        })
        clear_textbox();

        return false;
    });
})
</script>

<script>
  function validadatos(){
      if(!vacio(document.formulario.orden.value)){
      alert('Debe ingresar un numero de orden de flete');
      document.formulario.orden.focus();
      return false;
      }
  }
</script>

<script language=JavaScript>
function clear_textbox()
{
    document.formulario.reset();
}
</script>

</head>
<body onload="document.forms.formulario.orden.focus()">

<table align="center">
    <tr>
        <td>
            <fieldset>
                <legend>Orden de Flete</legend>
                <form action="buscar_editar_orden_flete.php" name="formulario" id="formulario" autocomplete="off" method="post" onsubmit="return validadatos();">
                    <input type="text" name="orden" />
                    <input type="submit" name="mysubmit" value="Buscar" />
                </form>
            </fieldset>
        </td>
    </tr>
</table>

<div id="loading"></div>
<div id="result"></div>

</body>

</html>